// 路由配置
import Vue from 'vue'
import Router from 'vue-router'
import App from '@/App'
import Index from '@/children/index/index'
// 知识管理
import Knowledge from '@/children/index/children/knowledge'
// 知识管理-我的笔记
import Notes from '@/children/index/children/knowChildren/notes'
// 知识管理-我的发稿
import Contribution from '@/children/index/children/knowChildren/contribution'
// 知识管理-我的简报
import Report from '@/children/index/children/knowChildren/report'
// 知识管理-我的评论
import Comment from '@/children/index/children/knowChildren/comment'
// 知识管理-我的点赞
import Share from '@/children/index/children/knowChildren/share'
// 知识管理-我的收藏
import Collect from '@/children/index/children/knowChildren/collect'
// 导航
import Navigation from '@/children/index/children/navigation'
// 导航navList
import NavList from '@/children/index/children/navChildren/navList'
// 导航详情页NavListIndex
import NavListIndex from '@/children/navDetails/navListIndex'
// 推荐
import Recommend from '@/children/index/children/recommend'
// 我的订阅
import Subscribe from '@/children/index/children/subscribe'
// 我的订阅-详情页
import Particulars from '@/children/particulars/particulars'
// 登录
import Login from '@/children/login/login'
// 注册
import Register from '@/children/register/register'
// 找回密码
import FPassword from '@/children/FPassword/FPassword'
// 制作简报
import Briefing from '@/children/briefing/briefing'
// 预览简报
import BriefingLook from '@/children/briefing/briefingLook'
// 购买
import BuyIndex from '@/children/buy/buyIndex'
// 购买套餐
import BuyPlan from '@/children/buy/buyChildren/buyPlan'
// 购买服务协议
import BuyServe from '@/children/buy/buyChildren/buyServe'
// 购买订单信息
import BuyOrder from '@/children/buy/buyChildren/buyOrder'
// 购买微信付款
import WeChatPay from '@/children/buy/buyChildren/weChatPay'
// 购买支付宝支付
import Alipay from '@/children/buy/buyChildren/alipay'
// 购买银联支付
import Unionpay from '@/children/buy/buyChildren/unionpay'
// 购买对公账号
import AccountPay from '@/children/buy/buyChildren/accountPay'
// 购买支付成功
import PaySuccess from '@/children/buy/buyChildren/paySuccess'
// 购买支付成功
import PayFailure from '@/children/buy/buyChildren/payFailure'
// 搜索结果页
import SearchList from '@/children/searchList/searchList'
// 搜索结果页综合
import Comprehensive from '@/children/searchList/children/comprehensive'
// 搜索结果页动态数据
import DynamicData from '@/children/searchList/children/dynamicData'
// 搜索结果页科技文献
import Science from '@/children/searchList/children/science'
// 搜索结果页专利数据
import PatentData from '@/children/searchList/children/patentData'
// 搜索结果页成果库
import ResultBase from '@/children/searchList/children/resultBase'
// 搜索结果页图书
import Books from '@/children/searchList/children/books'
// 搜索结果内容页
import SearchListContent from '@/children/searchListContene/searchListContent'
// 搜索结果内容页成果库
import ResultBaseCon from '@/children/searchListContene/children/resultBase'
// 搜索结果内容页图书
import BooksCon from '@/children/searchListContene/children/books'
// 搜索结果内容页科技文献
import ScienceCon from '@/children/searchListContene/children/science'
// 搜索结果内容页专利数据
import PatentDataCon from '@/children/searchListContene/children/patentData'
// 反馈主题/信息源
import FeedbackZT from '@/children/feedbackZT/feedbackZT'
// 制作简报-承载页面
import MakeIndex from '@/children/makeReport/makeIndex'
// 制作简报
import MakeText from '@/children/makeReport/makeChild/makeText'
// 制作简报-预览
import MakePreview from '@/children/makeReport/makeChild/makePreview'
// 我要发稿
import SendIndex from '@/children/sendReport/sendIndex'
// 个人中心-view
import PersonIndex from '@/children/personal/personIndex'
// 个人中心-info
import PersonInfo from '@/children/personal/perChildren/personInfo'
// 个人中心-center
import PerCenter from '@/children/personal/perChildren/infoChild/perCenter'
// 个人中心-头像设置
import Portrait from '@/children/personal/perChildren/infoChild/portrait'
// 个人中心-修改密码
import ChangeReg from '@/children/personal/perChildren/changeReg'
// 个人中心-邀请用户
import Invite from '@/children/personal/perChildren/infoChild/invite'
// 个人中心-发送邮件
import SendEmail from '@/children/personal/perChildren/sendEmail'
// 个人中心-消息管理
import PerNews from '@/children/personal/perChildren/infoChild/perNews'
// 个人中心-订单管理router-view
import OrderMana from '@/children/personal/perChildren/infoChild/orderMana'
// 个人中心-订单管理
import PerOrder from '@/children/personal/perChildren/infoChild/manaChild/perOrder'
// 个人中心-订单管理-查看订单
import OrderCheck from '@/children/personal/perChildren/infoChild/manaChild/orderCheck'
// 个人中心-查看订单-未注册
import NoReg from '@/children/personal/perChildren/infoChild/manaChild/noReg'
// 个人中心-查看订单-电子发票
import EleInvoice from '@/children/personal/perChildren/infoChild/manaChild/eleInvoice'

Vue.use(Router)

export default new Router({
  routes: [{
    path: '/',
    component: App,
    children: [{
      path: '/',
      redirect: '/index/subscribe'
    }, {
      path: '/index',
      component: Index,
      children: [
        {
          path: '/index/knowledge',
          component: Knowledge,
          children: [
            { path: '/index/knowledge', redirect: '/index/knowledge/notes'},
            { path: '/index/knowledge/notes', component: Notes },
            { path: '/index/knowledge/contribution', component: Contribution },
            { path: '/index/knowledge/report', component: Report },
            { path: '/index/knowledge/comment', component: Comment },
            { path: '/index/knowledge/share', component: Share },
            { path: '/index/knowledge/collect', component: Collect }
          ]
        },
        {path: '/index/subscribe', component: Subscribe},
        {path: '/index/recommend', component: Recommend},
        {
          path: '/index/navigation',
          component: Navigation,
          redirect: '/index/navigation/navList',
          children: [
            {path: 'navList', component: NavList, name: 'navList'}
          ]
        }
      ]
    }, {
      path: '/particulars',
      component: Particulars
    }, {
      path: '/login',
      component: Login
    }, {
      path: '/register',
      component: Register
    }, {
      path: '/FPassword',
      component: FPassword
    }, {
      path: '/briefing',
      component: Briefing,
      name: 'briefing'
    }, {
      path: '/briefingLook',
      component: BriefingLook,
      name: 'briefingLook'
    }, {
      path: '/buyIndex',
      component: BuyIndex,
      name: 'buyIndex',
      redirect: '/buyIndex/buyPlan',
      children: [
        {path: '/buyIndex/buyPlan', component: BuyPlan, name: 'buyPlan'},
        {path: '/buyIndex/buyServe', component: BuyServe, name: 'buyServe'},
        {path: '/buyIndex/buyOrder', component: BuyOrder, name: 'buyOrder'},
        {path: '/buyIndex/weChatPay', component: WeChatPay, name: 'weChatPay'},
        {path: '/buyIndex/alipay', component: Alipay, name: 'alipay'},
        {path: '/buyIndex/unionpay', component: Unionpay, name: 'unionpay'},
        {path: '/buyIndex/accountPay', component: AccountPay, name: 'accountPay'},
        {path: '/buyIndex/paySuccess', component: PaySuccess, name: 'paySuccess'},
        {path: '/buyIndex/payFailure', component: PayFailure, name: 'payFailure'}
      ]
    }, {
      path: '/searchList',
      component: SearchList,
      children: [{
        path: '/searchList',
        redirect: '/searchList/comprehensive'
      }, {
        path: '/searchList/comprehensive',
        component: Comprehensive
      }, {
        path: '/searchList/dynamicData',
        component: DynamicData
      }, {
        path: '/searchList/science',
        component: Science
      }, {
        path: '/searchList/patentData',
        component: PatentData
      }, {
        path: '/searchList/resultBase',
        component: ResultBase
      }, {
        path: '/searchList/books',
        component: Books
      }]
    }]
  }, {
    path: '/searchListContent',
    component: SearchListContent,
    children: [
      {path: '/searchListContent/resultBase', component: ResultBaseCon},
      {path: '/searchListContent/books', component: BooksCon},
      {path: '/searchListContent/science', component: ScienceCon},
      {path: '/searchListContent/patentData', component: PatentDataCon}
    ]
  }, {
    path: '/navListIndex',
    component: NavListIndex,
    name: 'navListIndex'
  }, {
    path: '/makeIndex',
    component: MakeIndex,
    name: 'makeIndex',
    redirect: '/makeIndex/makeText',
    children: [
      {path: '/makeIndex/makeText', component: MakeText, name:'makeText'},
      {path: '/makeIndex/makePreview', component: MakePreview, name:'makePreview'}
    ]
  }, {
    path: '/sendIndex',
    component: SendIndex,
    name: 'sendIndex'
  }, {
    path: '/personIndex',
    component: PersonIndex,
    name: 'personIndex',
    redirect: '/personIndex/personInfo',
    children: [
      {
      	path: '/personIndex/personInfo', 
      	component: PersonInfo, 
      	name:'personInfo',
      	children: [
      		{path: '/personIndex/personInfo', component: PerCenter,redirect: '/personIndex/personInfo/perCenter'},
      		{path: '/personIndex/personInfo/perCenter', component: PerCenter, name:'perCenter'},
      		{path: '/personIndex/personInfo/invite', component: Invite, name:'invite'},
      		{path: '/personIndex/personInfo/perNews', component: PerNews, name:'perNews'},
      		{
      			path: '/personIndex/personInfo/orderMana', 
      			component: OrderMana, 
      			name:'orderMana',
      			redirect: '/personIndex/personInfo/orderMana/perOrder',
      			children: [
      			  {
      			  	path: '/personIndex/personInfo/orderMana/perOrder', 
      			  	component: PerOrder,
      			  	name: 'perOrder'
      			  },
      			  {
      			  	path: '/personIndex/personInfo/orderMana/orderCheck', 
      			  	component: OrderCheck, 
      			  	name:'orderCheck'
      			  },
      			  {
      			  	path: '/personIndex/personInfo/orderMana/noReg', 
      			  	component: NoReg, 
      			  	name:'noReg'
      			  },
      			  {
      			  	path: '/personIndex/personInfo/orderMana/eleInvoice', 
      			  	component: EleInvoice, 
      			  	name:'eleInvoice'
      			  }
      			]
      		},
      		{path: '/personIndex/personInfo/portrait', component: Portrait, name:'portrait'}
      	]
      }, {
      	path: '/personIndex/changeReg',
		    component: ChangeReg,
		    name: 'changeReg'
      }, {
      	path: '/personIndex/sendEmail',
		    component: SendEmail,
		    name: 'sendEmail'
      }
    ]
  }, {
    path: '/feedbackZT',
    component: FeedbackZT
  }]
})
